from django.conf.urls import patterns, include, url
import settings


# Uncomment the next two lines to enable the admin:
from django.contrib import admin
#import haystack
#from haystack.views import SearchView

#haystack.autodiscover()
admin.autodiscover()

urlpatterns = patterns('',
                       # Examples:
                       url(r'^assets/(?P<path>.*)$', 'django.views.static.serve',
                           {'document_root': settings.STATIC_PATH}),
                       (r'^i18n/', include('django.conf.urls.i18n')),
                       url(r'^$', 'eeacl.casestudy.views.index'),
                       url(r'^signup/$', 'eeacl.casestudy.views.signup'),
                       url(r'^login/$', 'eeacl.casestudy.views.login_view'),
                       url(r'^logout/$', 'eeacl.casestudy.views.logout_view'),
                       url(r'^my/password/forgot/$', 'eeacl.casestudy.views.forget_password'),
                       url(r'^my/password/reset/(.+)/$', 'eeacl.casestudy.views.begin_reset_password'),
                       url(r'^newpass/$', 'eeacl.casestudy.views.reset_password'),
                       url(r'^my/setting/$', 'eeacl.casestudy.views.setting'),
                       url(r'^my/home/$', 'eeacl.casestudy.views.personal'),
                       url(r'^my/case/$', 'eeacl.casestudy.views.personalcase'),
                       url(r'^personalcasePage/$', 'eeacl.casestudy.views.personalcasePage'),
                       url(r'^my/favor/$', 'eeacl.casestudy.views.personalfavorite'),
                       url(r'^personalfavoritePage/$', 'eeacl.casestudy.views.personalfavoritePage'),
                       url(r'^personalPage/$', 'eeacl.casestudy.views.personalPage'),
                       url(r'^province/list/$', 'eeacl.casestudy.views.getProvinceSelectList'),
                       url(r'^province/city/list/$', 'eeacl.casestudy.views.getCitySelectList'),
                       url(r'^my/password/change/$', 'eeacl.casestudy.views.changePassword'),
                       url(r'^problem/add/$', 'eeacl.casestudy.views.addProblem'),
                       url(r'^problem/update/(\d+)/$', 'eeacl.casestudy.views.updateProblem'),
                       url(r'^problemUpdate/$', 'eeacl.casestudy.views.problemUpdate'),
                       url(r'^problem/list/(\d+)/$', 'eeacl.casestudy.views.problemList'),
                       url(r'^list/$', 'eeacl.casestudy.views.list'),

                       #url(r'^search/', include('haystack.urls')),
                       #url(r'^search/', SearchView('search/cell.html'), name='haystack_search'),
                       url(r'^so/', 'eeacl.casestudy.views.search'),
                       url(r'^case/attachment/upload/$', 'eeacl.casestudy.views.caseAttach'),
                       url(r'^case/attachment/edit/$', 'eeacl.casestudy.views.editAttach'),
                       url(r'^case/attachment/del/(\d+)/$', 'eeacl.casestudy.views.delAttach'),
                       url(r'^case/add/$', 'eeacl.casestudy.views.case_add'),
                       url(r'^case/edit/$', 'eeacl.casestudy.views.save_case'),
                       url(r'^case/category/$', 'eeacl.casestudy.views.category'),
                       url(r'^case/(\d+)/$', 'eeacl.casestudy.views.casedetail'),
                       url(r'^caseedit/(\d+)/$', 'eeacl.casestudy.views.case_update_index'),
                       url(r'^editcase/$', 'eeacl.casestudy.views.case_update'),
                       url(r'^problem/(\d+)/$', 'eeacl.casestudy.views.problem'),
                       url(r'^case/search/$', 'eeacl.casestudy.views.casequeryIndex'),
                       url(r'^casequery/ajax/$', 'eeacl.casestudy.views.casequery'),
                       url(r'^upload_script/$', 'eeacl.casestudy.views.uploadify_script'),
                       url(r'^fileupload/$', 'eeacl.casestudy.views.fileupload'),
                       url(r'^comment/edit/$', 'eeacl.casestudy.views.saveComment'),
                       url(r'^comment/pages/$', 'eeacl.casestudy.views.queryCommentPage'),
                       url(r'^my/favor/add/$', 'eeacl.casestudy.views.addfavorite'),
                       url(r'^case/attachment/add/$', 'eeacl.casestudy.views.caseAttach'),
                       url(r'^contact/$', 'eeacl.casestudy.views.contact'),
                       url(r'^saveAnswer/(\d+)/$', 'eeacl.casestudy.views.saveAnswer'),
                       url(r'^showUserAnswer/(\d+)/', 'eeacl.casestudy.views.showUserAnswer'),

                       # Uncomment the admin/doc line below to enable admin documentation:
                       # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

                       # Uncomment the next line to enable the admin:
                       url(r'^admin/', include(admin.site.urls)),
)

